$f(x)=x^2-2x-1$ What is the average rate of change of $f$ over the interval $1\leq x \leq 1+h$, in terms of $h$, where $h\neq 0$ ? Your answer must be fully expanded and simplified.
Solution: This is the formula for the average rate of change of a function $f$ over the interval $[a,b]$ : $\dfrac{f(b)-f(a)}{b-a}$ We can calculate that $f(1)=-2$. We are interested in the average rate of change of $f(x)=x^2-2x-1$ over the interval $1\leq x \leq 1+h$ : $\begin{aligned} &\phantom{=}\dfrac{f(1+h)-f(1)}{(1+h)-(1)} \\\\ &=\dfrac{(1+h)^2-2(1+h)-1-(-2)}{1+h-(1)} \\\\ &=\dfrac{(1+h)^2-2(1+h)+1}{h} \end{aligned}$ We can now simplify the expression we obtained. $\begin{aligned} &\phantom{=}\dfrac{(1+h)^2-2(1+h)+1}{h} \\\\ &=\dfrac{1+2h+h^2-2-2h+1}{h} \\\\ &=\dfrac{h^2}{h} \\\\ &=\dfrac{h(h)}{h} \\\\ &=h\text{, for }h\neq 0 \end{aligned}$ Since we are given that $h\neq 0$, the average rate of change of the function is $h$. Notice that the average rate of change is calculated just like the slope of the secant line that intersects the graph of the function at the interval's endpoints.